package com.xuhao.examai.exam.application.services;

import jakarta.validation.constraints.*;
import lombok.Data;
import java.time.LocalDateTime;

@Data
public class ExamDTO {
	@NotBlank(message = "考试标题不能为空")
	@Size(max = 100, message = "考试标题长度不能超过100个字符")
	private String title;

	@Size(max = 1000, message = "考试描述长度不能超过1000个字符")
	private String description;

	@NotNull(message = "开始时间不能为空")
	@Future(message = "开始时间必须是将来的时间")
	private LocalDateTime startTime;

	@NotNull(message = "结束时间不能为空")
	@Future(message = "结束时间必须是将来的时间")
	private LocalDateTime endTime;

	@NotNull(message = "考试时长不能为空")
	@Min(value = 1, message = "考试时长不能小于1分钟")
	@Max(value = 300, message = "考试时长不能超过300分钟")
	private Integer duration;

	@NotNull(message = "总分不能为空")
	@Min(value = 1, message = "总分不能小于1分")
	private Integer totalScore;

	private Boolean isPublished;
}
